package stage1.module2;

public class Homework3Test {
    public static void main(String[] args) {
        //开户
        Homework3Card card = new Homework3Card(Homework3CardEnum.bigCard, "1234", "aaa", "123456");
        //充话费
        card.topUp(100);
        //显示卡号、用户名、余额
        card.show();

        //使用多态显示通话套餐,并开通通话服务
        Homework3Plan talkPlan = new Homework3TalkPlan(200, 1000, 100);
        talkPlan.show();
        Homework3TalkInterface talkService = new Homework3TalkPlan(200, 1000, 100);
        talkService.talk(200, card);

        //使用多态显示上网套餐,并开通上网服务
        Homework3Plan InternetPlan = new Homework3InternetPlan(100, 100);
        InternetPlan.show();
        Homework3InternetInterface InternetService = new Homework3InternetPlan(100, 100);
        InternetService.Internet(100, card);

    }
}
